import React from 'react';
import { Image } from 'antd';
import styles from './index.less';

interface DetailBoxProps {
  src: string;
  title: string;
  price: number;
  number: number;
}

const DetailBox: React.FC<DetailBoxProps> = ({ src, title, price, number }) => {
  return (
    <div className={styles.detailItem}>
      <Image className={styles.imgstyle} src={src} />
      <div>
        <p className={styles.title}>{title}</p>
        <p>
          单价:{price} 数量:{number} 总价:{price * number}{' '}
        </p>
      </div>
    </div>
  );
};

export default DetailBox;
